/**
 * 协变：子类赋值给父类的情况
*/
class Animal {
    doAnimalThing(): void {
        console.log("I am a Animal!")
    }
}
class Dog extends Animal {
    doDogThing(): void {
        console.log("I am a Dog!")
    }
}
class Cat extends Animal {
    doCatThing(): void {
        console.log("I am a Cat!")
    }
}
function makeAnimalThing(ani: Animal) {// 定义方
    ani.doAnimalThing()
    // ... 
}
makeAnimalThing(new Dog())// 调用方


//export {}：解决“无法重新声明块范围变量”错误提示问题
export { }